package com.qj.daibei.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qj.daibei.mapper.CityMapper;
import com.qj.daibei.pojo.City;
import com.qj.daibei.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * author wml
 * Created on 2021/9/24 11:39
 */
@Service
public class CityServiceImpl implements CityService {

    @Autowired
    private CityMapper cityMapper;

    @Override
    public City queryCityByCityId(String city) {
        return null;
    }

    @Override
    public List<City> queryAllCity() {
        return this.cityMapper.selectList(null);
    }

    @Override
    public List<City> queryCityByProId(String proId) {
        QueryWrapper<City> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("pro_id", proId);
        return this.cityMapper.selectList(queryWrapper);
    }
}
